/**
 * 
 */
package com.suman.rss.activity;


import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.appwidget.AppWidgetManager;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;

import com.suman.bbcticker.R;

/**
 * @author ShivakP
 *
 */
public class WrongLaunchAlertActivity extends Activity {
	private int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;
	
	 @Override
	  protected void onCreate(Bundle icicle) {
		super.onCreate(icicle);
		Intent launchIntent = getIntent();
		Bundle extras = launchIntent.getExtras();
		if (extras != null) {
			mAppWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
		}
		showDialog(mAppWidgetId);
	  }
	 
	 @Override
		protected Dialog onCreateDialog(int id) {
		 return new AlertDialog.Builder(this)
         .setIcon(R.drawable.alert_dialog_icon)
         .setTitle(R.string.wronglaunch_alert_title)
         .setMessage(R.string.wronglaunch_alert_message)
         .setPositiveButton(R.string.wronglaunch_alert_dialogok, new DialogInterface.OnClickListener() {
             public void onClick(DialogInterface dialog, int whichButton) {
                 finish();
             }
         })         
         .create();
			
		}

}
